package com.example.work4.http


import okhttp3.MediaType
import okhttp3.RequestBody
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object BaseRetrofit {
    fun get(baseURL:String): Retrofit {
        val retrofit = Retrofit.Builder()
            .baseUrl(baseURL)
            .addConverterFactory(GsonConverterFactory.create())
            .build()
        return retrofit
    }


    fun StringToRequestBody(str:String):RequestBody
    {
        return RequestBody.create(MediaType.parse("text/plain"), str)
    }
}